//
//  ImageModelCell.m
//  EPA
//
//  Created by lanou3g on 16/4/20.
//  Copyright © 2016年 浮夸. All rights reserved.
//

#import "ImageModelCell.h"

@interface ImageModelCell ()

@property (weak, nonatomic) IBOutlet UILabel *titleLabel;

@property (weak, nonatomic) IBOutlet UILabel *contentLabel;

@property (weak, nonatomic) IBOutlet UIImageView *coverimgImage;
@property (weak, nonatomic) IBOutlet UILabel *unameLabel;
@property (weak, nonatomic) IBOutlet UIImageView *iconImage;

@property (weak, nonatomic) IBOutlet UILabel *addtimeLabel;

@end


@implementation ImageModelCell

-(void)setModel:(ImageModel *)model
{
    if (_model != model) {
        _model = model;
    }
}

- (void)layoutSubviews
{
    self.titleLabel.text = self.model.title;
    self.contentLabel.text =self.model.content;
    self.coverimgImage.image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:self.model.coverimg]]];
    self.unameLabel.text = self.model.userinfoModel.uname;
    [self.iconImage sd_setImageWithURL:[NSURL URLWithString:self.model.userinfoModel.icon]];
  //  self.addtimeLabel.text = self.model.addtime_f;
    
}

+ (CGFloat)height{
    return 200;
}

#pragma mark - 分享,评论,收藏点击事件

- (IBAction)didClickshareBtn:(UIButton *)sender
{
     NSLog(@"分享");
}

- (IBAction)didClickcommentsBtn:(UIButton *)sender
{
     NSLog(@"评论");
}

- (IBAction)didClickcollectionBtn:(UIButton *)sender
{
     NSLog(@"收藏");
}






@end
